# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_perlmod='JSON'
pkgname="perl-${_perlmod}"
pkgver=2.97001
pkgrel=1
pkgdesc="JSON (JavaScript Object Notation) encoder/decoder"
arch=('any')
url="https://metacpan.org/release/JSON"
license=('GPL' 'PerlArtistic')
groups=('perl-modules')
depends=('perl>=5.10.0')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/JSON-${pkgver}.tar.gz)
sha256sums=('e277d9385633574923f48c297e1b8acad3170c69fa590e31fa466040fc6f8f5a')

build() {
  cd  "${srcdir}"/JSON-${pkgver}
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "${srcdir}"/JSON-${pkgver}
  make install DESTDIR="${pkgdir}"
  find "${pkgdir}" -name '.packlist' -delete
  find "${pkgdir}" -name '*.pod' -delete
}
